
package com.scs.application.modules.base.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.scs.application.modules.base.entity.HospitalSupplier;
import com.scs.application.modules.base.request.HospitalSupplierQueryRequest;
import com.scs.application.modules.base.vo.ExcelHospitalSupplierVO;
import com.scs.application.modules.base.vo.HospitalSupplierVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * HospitalSupplier mapper对象
 */
@Mapper
public interface HospitalSupplierMapper extends BaseMapper<HospitalSupplier> {

    IPage<HospitalSupplier> page(IPage page, @Param("request") HospitalSupplierQueryRequest request);
    List<HospitalSupplier> list(@Param("request") HospitalSupplierQueryRequest request);

    /**
     * 根据供应商获取医院
     *
     * @param page
     * @param request
     * @return
     */
    IPage<HospitalSupplier> pageByKeywords(IPage page, @Param("request") HospitalSupplierQueryRequest request);

    /**
     * 根据医院获取供应商
     *
     * @param page
     * @param request
     * @return
     */
    IPage<HospitalSupplier> pageByKeywordsForHospital(IPage page, @Param("request") HospitalSupplierQueryRequest request);

    /**
     * 根据供应商名称查询供应商id
     */
    List<HospitalSupplier> findBySupplierName(@Param("supplierName") String supplierName, @Param("hospitalId") String hospitalId);

    /**
     * 院方接口 供应商查询
     *
     * @param request
     * @return
     */
    List<HospitalSupplierVO> listVO(@Param("request") HospitalSupplierQueryRequest request);

    /**
     * 院方接口 供应商查询
     *
     * @param request
     * @return
     */
    List<HospitalSupplierVO> listBySupplier(@Param("request") HospitalSupplierQueryRequest request);

    List<HospitalSupplierVO> listByHospital(@Param("request") HospitalSupplierQueryRequest request);

    List<ExcelHospitalSupplierVO> listExcel(@Param("request") HospitalSupplierQueryRequest request);

    int insertBatchSomeColumn(@Param("list") List<HospitalSupplier> entityList);

}
